package cc.aiee.wxpay.config;

import java.io.Serializable;

import javax.validation.constraints.NotBlank;

import cc.aiee.core.bean.PayBaseConfig;
import cc.aiee.core.interfaces.PayJsonBeanInterface;
import cc.aiee.core.kit.KitJson;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
public class WxPayConfig extends PayBaseConfig implements Serializable, PayJsonBeanInterface {

	private static final long serialVersionUID = 1L;

	@NotBlank
	private String appId;

	@NotBlank
	private String mchId;

	@NotBlank
	private String apiSecret;

	@NotBlank
	private String  certPath;
	
	@NotBlank
	private String  certPwd;
	
	@NotBlank
	private String notifyUrl;
	
	private String notifyUrlRefund ;

	@Override
	public String toJson() {
		return KitJson.toJSONString(this);
	}

	@Override
	public String toJson(boolean prettyFormat, boolean ignoreNull) {
		return KitJson.toJSONString(this, prettyFormat, ignoreNull);
	}

}
